package com.slliver.pay.config;


import feign.Logger;
import feign.RequestInterceptor;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;
import java.util.concurrent.TimeUnit;

@Configuration
public class PayServiceConfig {


    /**
     * 配置openfeign的日志级别
     */
    @Bean
    Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }

    @Bean
    Retryer retryer(){
        // 使用默认的重试机制
        return new Retryer.Default(100L, TimeUnit.SECONDS.toMillis(1L), 5);
    }


}
